package apt.action;

import java.util.List;

import apt.bean.PromotionBean;
import apt.dao.PromotionDao;

import com.opensymphony.xwork2.ActionSupport;

public class PromotionAction extends ActionSupport{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private PromotionBean promotionBean;
	private PromotionDao  promotionDao;
	private List<PromotionBean> listPromotion;
	
	public PromotionAction() {
		promotionDao = new PromotionDao();
	}
	
	public String getAllPromotion()
	{
		try {
			listPromotion = promotionDao.getlistPromotion();
		} catch (Exception e) {
			return ERROR;
		}
		return SUCCESS;
	}

	
	
	public List<PromotionBean> getListPromotion() {
		return listPromotion;
	}

	public void setListPromotion(List<PromotionBean> listPromotion) {
		this.listPromotion = listPromotion;
	}

	public PromotionBean getPromotionBean() {
		return promotionBean;
	}

	public void setPromotionBean(PromotionBean promotionBean) {
		this.promotionBean = promotionBean;
	}
	


	
	
	
}	
